/*
model for mcv format.
*/

#ifndef MYVIEW_H
#define MYVIEW_H

#include <vector>
#include <allegro5/allegro.h>

#include "mvc/mycontroller.h"

class MyController;

class MyView {
  private:

  protected:
    MyController* controller;
    std::vector<MyView*> children;
    MyView* parent;

  public:
    // ----------------- constructors ---------------- //
    MyView();

    // --------------- getters/setters --------------- //
    MyController* getController();
    void setController(MyController* val);

    MyView* getParent();
    void setParent(MyView*);

    // ------------------- other --------------------- //
    void addChild(MyView*);
    void removeChild(MyView*);

    void draw();

    // ------------------ virtual -------------------- //
    virtual void drawme() = 0;
};

#endif

